From f5be265e8c4c75da782db992672004e25472a9c1 Mon Sep 17 00:00:00 2001 From: tsteven4 <13596209+tsteven4@users.noreply.github.com> Date: Mon, 21 Feb 2022 07:53:36 -0700 Subject: [PATCH] fix garmin_gpi debug code. (#853) https://github.com/GPSBabel/gpsbabel/pull/833/files introduced a bug with unique_ptr. --- garmin_gpi.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/garmin_gpi.cc b/garmin_gpi.cc index 36d1aca91..e40580e5f 100644 --- a/garmin_gpi.cc +++ b/garmin_gpi.cc @@ -571,7 +571,7 @@ GarminGPIFormat::read_tag(const char* caller, const int tag, Waypoint* wpt) #ifdef GPI_DBG { int x; - std::unique_ptr b(new unsigned char(sz)); + std::unique_ptr b(new unsigned char[sz]); fprintf(stderr, "Tag: %x\n", tag); gbfread(b.get(), 1, sz, fin); fprintf(stderr, "\n"); -- 2.30.2